﻿<Window x:Class="ParsecClient.DpsMeter"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DpsMeter"  Width="250" WindowStyle="None" AllowsTransparency="True" Opacity="1" Topmost="True" ShowInTaskbar="False" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Top" ResizeMode="NoResize" SizeToContent="Height">
    <Window.Resources>
        <ResourceDictionary Source="/CustomPopOutResources.xaml" />
    </Window.Resources>
    <Viewbox Name="MyViewBox" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Grid MouseLeftButtonDown="DragWindow" Grid.IsSharedSizeScope="True">
            <Border Style="{StaticResource BackgroundPopoutBorder}" Opacity="1" Margin="10" Name="BorderBackground" />
            <Border Style="{StaticResource BlurPopoutBorder}" Opacity="1" Margin="10" Name="BorderBlur" />
            <Border Style="{StaticResource SolidPopoutBorder}" Opacity="1" Margin="10" Name="BorderSolid" />
            <Border Style="{StaticResource ContentPopoutBorder}" Margin="10" Padding="5" MinWidth="270">
                <Grid SnapsToDevicePixels="True">
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <DockPanel LastChildFill="False"  Margin="0 0 0 0" Grid.Row="0">
                        <Button Name="btnIncreaseOpacity" ToolTip="Increase Opacity" Click="btnIncreaseOpacity_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12 M7.5,12 V3"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <Button Margin="2 0 0 0" ToolTip="Decrease Opacity" Name="btnDecreaseOpacity" Click="btnDecreaseOpacity_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <Button Margin="2 0 0 0" Grid.Column="2" Name="btnIncreaseSize" ToolTip="Increase Size" Click="btnIncreaseSize_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12 M7.5,12 V3"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <Button Margin="2 0 0 0" Grid.Column="3" ToolTip="Decrease Size" Name="btnDecreaseSize" Click="btnDecreaseSize_Click" DockPanel.Dock="Left" Style="{StaticResource OverlayButton}">
                            <Path Margin="0" Stroke="#FF4acefe" Data="M3,7.5 H12"  StrokeThickness="2" Height="17" Width="17" />
                        </Button>
                        <TextBlock Style="{StaticResource OverlayTextBlur}" Padding="0" Margin="10 0 0 0" DockPanel.Dock="Left">DPS</TextBlock>
                        <Button Name="btnClose" ToolTip="Close" DockPanel.Dock="Right" Click="btnClose_Click" Style="{StaticResource OverlayButton}">
                            <Path Stroke="#FF4acefe" StrokeThickness="2" Margin="0" Height="17" Width="17">
                                <Path.Data>
                                    <PathGeometry>
                                        <PathGeometry.Figures>
                                            <PathFigure StartPoint="3.5,3.5">
                                                <LineSegment Point="11.5,11.5"/>
                                            </PathFigure>
                                            <PathFigure StartPoint="3.5,11.5">
                                                <LineSegment Point="11.5,3.5"/>
                                            </PathFigure>
                                        </PathGeometry.Figures>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                        </Button>
                    </DockPanel>
                    <TextBlock Style="{StaticResource OverlayTextBig}" FontWeight="Bold" TextAlignment="Center" FontSize="30" Padding="0" Margin="0 4 0 6" Name="txtDps" Grid.Row="1"></TextBlock>
                    <Grid Grid.Column="0" Grid.Row="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Button Width="Auto" Height="20" FontSize="10" Margin="0 0 1 0" ToolTip="Show Last 5 Attacks" Name="btnLast5" Click="ModeHandler" Grid.Column="0" Style="{StaticResource OverlayButton}">Last 5</Button>
                        <Button Width="Auto" Height="20" FontSize="10" Margin="1 0 1 0" ToolTip="Show the Percent Damage by Ability" Name="btnRank" Click="ModeHandler" Grid.Column="1" Style="{StaticResource OverlayButton}">Abilities</Button>
                        <Button Width="Auto" Height="20" FontSize="10" Margin="1 0 0 0" ToolTip="Show No Extra Info" Name="btnNone" Click="ModeHandler" Grid.Column="2" Style="{StaticResource OverlayButton}">None</Button>
                    </Grid>
                    <ItemsControl Name="icAttacks" ItemsSource="{Binding}" SnapsToDevicePixels="True"  OpacityMask="{StaticResource GradientOpacityMask}" Grid.Row="3" Visibility="Collapsed">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Grid x:Name="rowGrid" SnapsToDevicePixels="True" Margin="0 1 0 1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="175"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <TextBlock x:Name="lblAttackName" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" TextAlignment="Left"  VerticalAlignment="Center" Style="{StaticResource OverlayTextWhiteBig}" Text="{Binding Path=Name, Mode=OneWay}" FontWeight="Normal" FontSize="12" Padding="0 0 10 1" SnapsToDevicePixels="True" TextWrapping="Wrap" Foreground="{Binding Path=DamageColor}"></TextBlock>
                                    <TextBlock x:Name="lblValue" Grid.Column="1" Grid.Row="0" Text="{Binding Path=Value, Mode=OneWay}" HorizontalAlignment="Stretch" TextAlignment="Right" VerticalAlignment="Center" Style="{StaticResource OverlayTextWhiteBig}" FontWeight="Normal" FontSize="18" Padding="0 0 0 0" SnapsToDevicePixels="True" Foreground="{Binding Path=DamageColor}"></TextBlock>
                                </Grid>
                                <DataTemplate.Triggers>
                                    <DataTrigger Binding="{Binding Path=IsCrit}" Value="true">
                                        <Setter Property="FontWeight" Value="Bold" TargetName="lblValue"></Setter>
                                    </DataTrigger>
                                </DataTemplate.Triggers>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                    <ItemsControl Name="icAttackDmg" ItemsSource="{Binding}" SnapsToDevicePixels="True" Grid.Row="3">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Grid x:Name="rowGrid" SnapsToDevicePixels="True" Margin="0 1 0 1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="225"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                        <ProgressBar Name="RowTimerProgressBar" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"  Minimum="0" Maximum="100" Value="{Binding Path=PctDamage, Mode=OneWay}" MinHeight="30" VerticalAlignment="Center" Margin="0 0 0 0" Style="{StaticResource PopOutProgress}"></ProgressBar>
                                    <TextBlock x:Name="lblAttackName" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" TextAlignment="Left"  VerticalAlignment="Center" Style="{StaticResource OverlayTextBig}" Text="{Binding Path=Name, Mode=OneWay}" FontWeight="Normal" FontSize="12" Padding="3 0 10 1" SnapsToDevicePixels="True" TextWrapping="Wrap"></TextBlock>
                                    <TextBlock x:Name="lblValue" Grid.Column="1" Grid.Row="0" Text="{Binding Path=Value, Mode=OneWay}" HorizontalAlignment="Stretch" TextAlignment="Right" VerticalAlignment="Center" Style="{StaticResource OverlayTextBig}" FontWeight="Normal" FontSize="18" Padding="0 0 3 0" SnapsToDevicePixels="True"></TextBlock>
                                </Grid>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Grid>
            </Border>
        </Grid>
    </Viewbox>
</Window>
